home *** CD-ROM | disk | FTP | other *** search
- Path: news.nas.com!news
- From: gldnspud@kali.nas.com (Matt Scott)
- Newsgroups: comp.lang.c
- Subject: Re: beginner question
- Date: Tue, 02 Apr 1996 02:07:28 GMT
- Organization: Everyone's Software
- Message-ID: <4jq27c$lcb@barad-dur.nas.com>
- References: <4jc3sr$1ggu@uvaix3e1.comp.UVic.CA> <4jdo7l$de2@sparcserver.lrz-muenchen.de> <315AFED2.7466@willows.com>
- NNTP-Posting-Host: kali.nas.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- Tarang Deshpande <tarang@willows.com> wrote:
-
- >So then what does the following mean:
-
- >struct _FOO
- >{
- > int bar;
- >} FOO;
-
- >struct _FOO s1;
- >FOO s2;
-
- This would first define a variable FOO of type struct _FOO. It would
- then define a variable s1 of type struct _FOO. However, the last line
- would be illegal to the best of my knowledge.
-
- If you inserted a typedef in front of the struct line:
-
- typedef struct _FOO
- {
- int bar;
- } FOO;
-
- then the last line would become legal.
-
- -matt
-
-